package com.text.control;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//控制类
@Controller
public class MainControl {
/*    跳转逻辑,
    RequestMapping
    属性:
    1.value:跳转目录
    2.params:跳转携带属性
    3.未完待续


    作用
    1.功能类似WebServlet,作为资源跳转目录
    2.重定向,返回语句前面加上  redirect:
    3.请求转发:返回语句前加上  forward:

    */

    @RequestMapping(value = "/text",params = {"username"})
    public ModelAndView index() {
        return new ModelAndView("and");
    }

    @RequestMapping("/text2")
    public ModelAndView index2() {
        return new ModelAndView("band");
    }
}

